<?php

$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);

$ip = '0.0.0.0';
$port = 9501;

socket_sendto($sock, 'this is UDP', 1024, 0, $ip, $port);

socket_close($sock);